import React, {Component, PropTypes} from 'react';

export default class Icon extends Component {

    static propTypes = {
        icon: PropTypes.string.isRequired,
        onClick: PropTypes.func.isRequired
    };

    static defaultProps = {
        icon: 'none',
        onClick: () => {}
    };

    render() {
        let className = 'icon icon-' + this.props.icon; 
        return <i className={className} onClick={this.props.onClick}/>
    }
}